//
//  MyHelper.h
//  录音
//
//  Created by user on 16/6/13.
//  Copyright © 2016年 jingyi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@interface MyHelper : NSObject

/**
 *  获取文件路径
 */
+ (NSString *)getPathByFileName:(NSString *)fileName
                         ofType:(NSString *)type;

/**
 *  判断文件是否存在
 */
+ (BOOL)fileExistsAtPath:(NSString*)path;

/**
 *  删除文件
 */
+ (BOOL)deleteFileAtPath:(NSString*)path;

/**
 *  获取当前时间戳
 */
+ (NSString *)getCurrentTimeString;

/**
 *  获取文件大小
 */
+ (NSInteger)getFileSize:(NSString*)path;

/**
 *  获取录音文件信息
 */
+ (void)getVoiceFileInfoWithFilePath:(NSString *)filePath
                            fileName:(NSString *)fileName
                         convertTime:(NSTimeInterval)convertTime;

/**
 *   wav格式转amr格式
 */
+ (NSString *)wavToAmrWithOriginWav:(NSString *)originWav;

/**
 *  amr转wav格式
 */
+ (NSString *)amrToWavWithOriginAmr:(NSString *)originAmr;

/**
 *  字典转json
 */
+ (NSString *)dictionaryToJson:(NSDictionary *)dic;

/**
 *  json转字典
 */
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

/**
 *   创建AVAudioSession
 */
+ (AVAudioSession *)initAVAudioSession;

@end
